<template>
  <div>
    <el-tag>
      跟踪记录
    </el-tag>
    <div v-for="item in dataList" style="font-size: 10px;">
      <el-row v-if="item.trackStatus">
        <el-col :span="8"><span>跟进状态</span></el-col>
        <el-col :span="16"><span>{{selectDictLabel(dict.type.track_status,item.trackStatus)}}</span></el-col>
      </el-row>
      <el-row v-if="item.nextTime">
        <el-col :span="8"><span>下次跟进时间</span></el-col>
        <el-col :span="16"><span>{{parseTime(item.nextTime)}}</span></el-col>
      </el-row>
      <el-row v-if="item.keyItems">
        <el-col :span="8"><span>沟通重点</span></el-col>
        <el-col :span="16">
          <span v-for="keyId in (item.keyItems.split(','))" :key="keyId" class="cus-tag-box">
            {{selectDictLabel(dict.type.communication_point,keyId)}}</span></el-col>
      </el-row>
      <el-row v-if="item.level">
        <el-col :span="8"><span>意向等级</span></el-col>
        <el-col :span="16"><span>{{selectDictLabel(dict.type.clues_level,item.level)}}</span></el-col>
      </el-row>
      <el-row v-if="item.subject">
        <el-col :span="8"><span>意向学科</span></el-col>
        <el-col :span="16"><span>{{selectDictLabel(dict.type.course_subject,item.subject)}}</span></el-col>
      </el-row>
      <el-row v-if="item.record">
        <el-col :span="8"><span>沟通纪要</span></el-col>
        <el-col :span="16"><span>{{item.record}}</span></el-col>
      </el-row>
      <el-row>
        <el-col :span="8"><span>记录人</span></el-col>
        <el-col :span="16"><span>{{item.operName}}</span></el-col>
      </el-row>
      <el-row>
        <el-col :span="8"><span>记录时间</span></el-col>
        <el-col :span="16"><span>{{item.operTime}}</span></el-col>
      </el-row>
      <hr>
    </div>


  </div>
</template>

<script>
  import {list} from '@/api/monitor/operlog'
  import {listBusinessTrack} from '@/api/crm/businesstrack'
  import {listtrack} from '@/api/crm/tracklog'
    export default {
        name: "tracklist",
      props:{
        bussignId:{
        type:String,Number
        }},
      dicts:['occupation','education','major','job','salary','sys_user_sex','course_subject','track_status','communication_point','clues_level'],
      data(){
          return{
            dataList:{},
            id:this.bussignId
          }
      },
      created() {
          this.getList()
      },
      methods:{
          getList(){
            listtrack({id:this.id,table:'商机'}).then(resp=>{
                this.dataList=resp.rows
            })




          }
        //     listBusinessTrack({title:'商机跟踪记录'}).then(res=>{
        //       this.dataList=this.parseData(res.rows);
        //     })
        //   },
        // parseData(result){
        //     let list=[];
        //     if(result && result.length>0){
        //       for (let item of result){
        //         let=JSON.parse(item);
        //         if.id===this.bussignId){
        //           console.log.id,this.bussignId)
        //           item;
        //           list.push(item)
        //         }
        //       }
        //     }
        //     return  list;
        // }

      }
    }
</script>

<style scoped>

</style>
